<?php
class Place_Model_AdminPlace extends Zend_Db_Table{
    protected $_name  = "admin_place";
    protected $_primary = "place_id";
    
    public function updatePlace($arrParams){
        $where = 'place_id = ' . $arrParams['place_id'];
        $row =  $this->fetchRow($where);
        foreach ($arrParams as $key => $value) {
            $row->$key = $value;
        }
        $row->save();
    }
    
    public function getAdminPlaceDetail($placeId){
        $normalUtils = new My_Utils_NormalUtils();
        $DB = $normalUtils->getNormalDb(0);
        $select = $DB   ->select()
                        ->from('admin_place')
                        ->where('place_id = ?',$placeId);
        $merchantDealResult = $DB->fetchAll($select);
        $result = $merchantDealResult[0];
        return $result;
    }
}
